#ifndef _MIXP_CORE_PROTOCOL_PACKET_H
#define _MIXP_CORE_PROTOCOL_PACKET_H

#include "core/mixp_core.h"

#ifdef __cplusplus
extern "C"
{
#endif

#pragma pack(push, 1)
    typedef enum mixp_packet_type
    {
        PACKET_CLIENT_JSON,
        PACKET_CLIENT_BINARY,

        PACKET_WORKER_REGISTER,
        PACKET_MASTER_TASK

    } mixp_packet_type;

    typedef struct mixp_packet_header
    {
        uint8_t type;
        uint32_t payload_len;
    } mixp_packet_header_t;

    typedef struct mixp_packet
    {
        mixp_packet_header_t header;
        void *payload;
    } mixp_packet_t;
#pragma pack(pop)

#ifdef __cplusplus
};
#endif
#endif